From f1fdd885aba2aec4155124c8d294096e230ead13 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 14 Oct 2019 14:20:44 +0000 Subject: [PATCH] sysroot: [scan-build]: Remove a dead assignment Clarify the conditionals here and remove a dead assignment. --- src/libostree/ostree-sysroot-deploy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index c342d7e0..6507b2c5 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -753,15 +753,14 @@ prepare_deployment_etc (OstreeSysroot *sysroot, return FALSE; gboolean usretc_exists = (errno == 0); - if (etc_exists && usretc_exists) - return glnx_throw (error, "Tree contains both /etc and /usr/etc"); - else if (etc_exists) + if (etc_exists) { + if (usretc_exists) + return glnx_throw (error, "Tree contains both /etc and /usr/etc"); /* Compatibility hack */ if (!glnx_renameat (deployment_dfd, "etc", deployment_dfd, "usr/etc", error)) return FALSE; usretc_exists = TRUE; - etc_exists = FALSE; } if (usretc_exists) -- 2.30.2